package com.joplus.housekeeper.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by ccm on 2016/9/12 11:05
 */
public class CamboDialogBean implements Parcelable {

    /**
     * msg : 获取成功
     * code : 200
     * menuDTO : [{"menuId":"menu14294392809780000","money":0,"priId":null,"levelName":"普通@@用户","storedId":"stored1467799280978gjqe","priName":null,"serId":null,"menuPriList":[{"id":17,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809781111","priName":"含爱马仕（Hermes）普通款手袋购买抵扣","serId":null,"count":"disCount"}]},{"menuId":"menu14294392809781111","money":150000,"priId":null,"levelName":"JO+@@Choice","storedId":"stored1467799280978gjqe","priName":null,"serId":null,"menuPriList":[{"id":17,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809781111","priName":"含爱马仕（Hermes）普通款手袋购买抵扣","serId":null,"count":"disCount"},{"id":18,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809782222","priName":"全球爱马仕（Hermes）手袋猎头服务","serId":null,"count":"disCount"},{"id":19,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809783333","priName":"爱马仕（Hermes）配饰国内价格6折起购买抵扣","serId":null,"count":"disCount"},{"id":20,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809784444","priName":"免费1次专业顶级清洗","serId":"ser146806648gd33zpSH","count":"1"},{"id":21,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809785555","priName":"免费1次专业翻新保养","serId":"ser147323668773830SS","count":"1"},{"id":22,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809786666","priName":"免费寄卖及高价回收","serId":null,"count":"disCount"},{"id":23,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809787","priName":"国内95折购买顶级珠宝品牌Chaumet及Fred珠宝配饰","serId":null,"count":"disCount"},{"id":24,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809788","priName":"全球珠宝裸石及顶级彩宝彩钻收藏最佳方案及购买抵用","serId":null,"count":"disCount"}]},{"menuId":"menu14294392809782222","money":500000,"priId":null,"levelName":"JO+@@Deluxe","storedId":"stored1467799280978gjqe","priName":null,"serId":null,"menuPriList":[{"id":25,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri146779928097869","priName":"含爱马仕（Hermes）普通及高端款手袋抵扣","serId":null,"count":"disCount"},{"id":26,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri1467799280978610","priName":"全球爱马仕（Hermes）手袋猎头服务","serId":null,"count":"disCount"},{"id":27,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri1467799280978611","priName":"爱马仕（Hermes）配饰国内价格5.5折起购买抵扣","serId":null,"count":"disCount"},{"id":28,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri1467799280978612","priName":"免费1次专业顶级清洗","serId":"ser146806648gd33zpSH","count":"1"},{"id":29,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri1467799280978613","priName":"免费1次专业翻新保养","serId":"ser147323668773830SS","count":"1"},{"id":30,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri1467799280978614","priName":"免费寄卖及高价回收","serId":null,"count":"disCount"},{"id":31,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri1467799280978615","priName":"国内9折购买顶级珠宝品牌Chaumet及Fred珠宝配饰","serId":null,"count":"disCount"},{"id":32,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809782222","menuPriId":"menupri1467799280978616","priName":"全球珠宝裸石及顶级彩宝彩钻收藏最佳方案及购买抵用","serId":null,"count":"disCount"}]}]
     */

    private String msg;
    private String code;
    /**
     * menuId : menu14294392809780000
     * money : 0
     * priId : null
     * levelName : 普通@@用户
     * storedId : stored1467799280978gjqe
     * priName : null
     * serId : null
     * menuPriList : [{"id":17,"storedId":"stored1467799280978gjqe","menuId":"menu14294392809781111","menuPriId":"menupri14677992809781111","priName":"含爱马仕（Hermes）普通款手袋购买抵扣","serId":null,"count":"disCount"}]
     */

    private List<MenuDTOBean> menuDTO;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public List<MenuDTOBean> getMenuDTO() {
        return menuDTO;
    }

    public void setMenuDTO(List<MenuDTOBean> menuDTO) {
        this.menuDTO = menuDTO;
    }

    public static class MenuDTOBean implements Parcelable {
        private String menuId;
        private int money;
        private String priId;
        private String levelName;
        private String storedId;
        private String priName;
        private String serId;
        /**
         * id : 17
         * storedId : stored1467799280978gjqe
         * menuId : menu14294392809781111
         * menuPriId : menupri14677992809781111
         * priName : 含爱马仕（Hermes）普通款手袋购买抵扣
         * serId : null
         * count : disCount
         */

        private List<MenuPriListBean> menuPriList;

        public String getMenuId() {
            return menuId;
        }

        public void setMenuId(String menuId) {
            this.menuId = menuId;
        }

        public int getMoney() {
            return money;
        }

        public void setMoney(int money) {
            this.money = money;
        }

        public Object getPriId() {
            return priId;
        }

        public void setPriId(String priId) {
            this.priId = priId;
        }

        public String getLevelName() {
            return levelName;
        }

        public void setLevelName(String levelName) {
            this.levelName = levelName;
        }

        public String getStoredId() {
            return storedId;
        }

        public void setStoredId(String storedId) {
            this.storedId = storedId;
        }

        public Object getPriName() {
            return priName;
        }

        public void setPriName(String priName) {
            this.priName = priName;
        }

        public Object getSerId() {
            return serId;
        }

        public void setSerId(String serId) {
            this.serId = serId;
        }

        public List<MenuPriListBean> getMenuPriList() {
            return menuPriList;
        }

        public void setMenuPriList(List<MenuPriListBean> menuPriList) {
            this.menuPriList = menuPriList;
        }

        public static class MenuPriListBean implements Parcelable {
            private int id;
            private String storedId;
            private String menuId;
            private String menuPriId;
            private String priName;
            private String serId;
            private String count;
            private String privilegePic;

            public String getPrivilegePic() {
                return privilegePic;
            }

            public void setPrivilegePic(String privilegePic) {
                this.privilegePic = privilegePic;
            }

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getStoredId() {
                return storedId;
            }

            public void setStoredId(String storedId) {
                this.storedId = storedId;
            }

            public String getMenuId() {
                return menuId;
            }

            public void setMenuId(String menuId) {
                this.menuId = menuId;
            }

            public String getMenuPriId() {
                return menuPriId;
            }

            public void setMenuPriId(String menuPriId) {
                this.menuPriId = menuPriId;
            }

            public String getPriName() {
                return priName;
            }

            public void setPriName(String priName) {
                this.priName = priName;
            }

            public String getSerId() {
                return serId;
            }

            public void setSerId(String serId) {
                this.serId = serId;
            }

            public String getCount() {
                return count;
            }

            public void setCount(String count) {
                this.count = count;
            }

            @Override
            public int describeContents() {
                return 0;
            }

            @Override
            public void writeToParcel(Parcel dest, int flags) {
                dest.writeInt(this.id);
                dest.writeString(this.storedId);
                dest.writeString(this.menuId);
                dest.writeString(this.menuPriId);
                dest.writeString(this.priName);
                dest.writeString(serId);
                dest.writeString(this.count);
                dest.writeString(privilegePic);
            }

            public MenuPriListBean() {
            }

            protected MenuPriListBean(Parcel in) {
                this.id = in.readInt();
                this.storedId = in.readString();
                this.menuId = in.readString();
                this.menuPriId = in.readString();
                this.priName = in.readString();
                this.serId = in.readParcelable(Object.class.getClassLoader());
                this.count = in.readString();
                privilegePic=in.readString();
            }

            public static final Creator<MenuPriListBean> CREATOR = new Creator<MenuPriListBean>() {
                @Override
                public MenuPriListBean createFromParcel(Parcel source) {
                    return new MenuPriListBean(source);
                }

                @Override
                public MenuPriListBean[] newArray(int size) {
                    return new MenuPriListBean[size];
                }
            };
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.menuId);
            dest.writeInt(this.money);
            dest.writeString(this.priId);
            dest.writeString(this.levelName);
            dest.writeString(this.storedId);
            dest.writeString(priName);
            dest.writeString(serId);
            dest.writeList(this.menuPriList);
        }

        public MenuDTOBean() {
        }

        protected MenuDTOBean(Parcel in) {
            this.menuId = in.readString();
            this.money = in.readInt();
            this.priId = in.readParcelable(Object.class.getClassLoader());
            this.levelName = in.readString();
            this.storedId = in.readString();
            this.priName = in.readParcelable(Object.class.getClassLoader());
            this.serId = in.readParcelable(Object.class.getClassLoader());
            this.menuPriList = new ArrayList<MenuPriListBean>();
            in.readList(this.menuPriList, MenuPriListBean.class.getClassLoader());
        }

        public static final Parcelable.Creator<MenuDTOBean> CREATOR = new Parcelable.Creator<MenuDTOBean>() {
            @Override
            public MenuDTOBean createFromParcel(Parcel source) {
                return new MenuDTOBean(source);
            }

            @Override
            public MenuDTOBean[] newArray(int size) {
                return new MenuDTOBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.msg);
        dest.writeString(this.code);
        dest.writeTypedList(this.menuDTO);
    }

    public CamboDialogBean() {
    }

    protected CamboDialogBean(Parcel in) {
        this.msg = in.readString();
        this.code = in.readString();
        this.menuDTO = in.createTypedArrayList(MenuDTOBean.CREATOR);
    }

    public static final Parcelable.Creator<CamboDialogBean> CREATOR = new Parcelable.Creator<CamboDialogBean>() {
        @Override
        public CamboDialogBean createFromParcel(Parcel source) {
            return new CamboDialogBean(source);
        }

        @Override
        public CamboDialogBean[] newArray(int size) {
            return new CamboDialogBean[size];
        }
    };
}